package com.wikimi.area.controller;

import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;



/**
 * Handles requests for the application home page.
 */
@Controller
public class AreaController {
	
	//private static final Logger logger = LoggerFactory.getLogger(HomeController.class);
	
	@RequestMapping(value = "/set_area_dzone", method = RequestMethod.GET)
	public String getAllAreaDzoneByPage(Model model,
			Authentication authentication) {
		
		if(authentication != null) {
			model.addAttribute("id", authentication.getName());
		}
		
		return "set_area_dzone";
	}
	
	@RequestMapping(value = "/set_area_izone", method = RequestMethod.GET)
	public String getAllAreaIzoneByPage(Model model,
			Authentication authentication) {
		
		if(authentication != null) {
			model.addAttribute("id", authentication.getName());
		}
		
		return "set_area_izone";
	}
	
	@RequestMapping(value = "/set_area_szone", method = RequestMethod.GET)
	public String getAllAreaSzoneByPage(Model model,
			Authentication authentication) {
		
		if(authentication != null) {
			model.addAttribute("id", authentication.getName());
		}
		
		return "set_area_szone";
	}
}
